package utils

import "github.com/google/uuid"

func GenerateUUID(str string) string {
	return uuid.NewSHA1(uuid.NameSpaceDNS, []byte(str)).String()
}

func ParseUUID(str string) (string, error) {
	uid := GenerateUUID(str)
	uu, err := uuid.Parse(uid)
	return uu.String(), err
}
